using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class EmailSetting
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private string _Email;

		public string Email
		{
			get { return _Email; }
			set { _Email = value; }
		}

		private string _SmtpUrl;

		public string SmtpUrl
		{
			get { return _SmtpUrl; }
			set { _SmtpUrl = value; }
		}

		private int? _SmtpPort;

		public int? SmtpPort
		{
			get { return _SmtpPort; }
			set { _SmtpPort = value; }
		}

		private string _SmtpUser;

		public string SmtpUser
		{
			get { return _SmtpUser; }
			set { _SmtpUser = value; }
		}

		private string _SmtpPassword;

		public string SmtpPassword
		{
			get { return _SmtpPassword; }
			set { _SmtpPassword = value; }
		}

		private string _IsSsl;

		public string IsSsl
		{
			get { return _IsSsl; }
			set { _IsSsl = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		private string _Note;

		public string Note
		{
			get { return _Note; }
			set { _Note = value; }
		}

		public EmailSetting()
		{ }

		public EmailSetting(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,string Email,string SmtpUrl,int? SmtpPort,string SmtpUser,string SmtpPassword,string IsSsl,int? AccountId,string Note)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.Email = Email;
			this.SmtpUrl = SmtpUrl;
			this.SmtpPort = SmtpPort;
			this.SmtpUser = SmtpUser;
			this.SmtpPassword = SmtpPassword;
			this.IsSsl = IsSsl;
			this.AccountId = AccountId;
			this.Note = Note;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",Email = " + Email + ",SmtpUrl = " + SmtpUrl + ",SmtpPort = " + SmtpPort.ToString() + ",SmtpUser = " + SmtpUser + ",SmtpPassword = " + SmtpPassword + ",IsSsl = " + IsSsl + ",AccountId = " + AccountId.ToString() + ",Note = " + Note;
		}

		public class IDComparer : System.Collections.Generic.IComparer<EmailSetting>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<EmailSetting> Membres
			int System.Collections.Generic.IComparer<EmailSetting>.Compare(EmailSetting x, EmailSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class EmailComparer : System.Collections.Generic.IComparer<EmailSetting>
		{
			public SorterMode SorterMode;
			public EmailComparer()
			{ }
			public EmailComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<EmailSetting> Membres
			int System.Collections.Generic.IComparer<EmailSetting>.Compare(EmailSetting x, EmailSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Email.CompareTo(x.Email);
				}
				else
				{
					return x.Email.CompareTo(y.Email);
				}
			}
			#endregion
		}
		public class SmtpUrlComparer : System.Collections.Generic.IComparer<EmailSetting>
		{
			public SorterMode SorterMode;
			public SmtpUrlComparer()
			{ }
			public SmtpUrlComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<EmailSetting> Membres
			int System.Collections.Generic.IComparer<EmailSetting>.Compare(EmailSetting x, EmailSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.SmtpUrl.CompareTo(x.SmtpUrl);
				}
				else
				{
					return x.SmtpUrl.CompareTo(y.SmtpUrl);
				}
			}
			#endregion
		}
		public class SmtpUserComparer : System.Collections.Generic.IComparer<EmailSetting>
		{
			public SorterMode SorterMode;
			public SmtpUserComparer()
			{ }
			public SmtpUserComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<EmailSetting> Membres
			int System.Collections.Generic.IComparer<EmailSetting>.Compare(EmailSetting x, EmailSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.SmtpUser.CompareTo(x.SmtpUser);
				}
				else
				{
					return x.SmtpUser.CompareTo(y.SmtpUser);
				}
			}
			#endregion
		}
		public class SmtpPasswordComparer : System.Collections.Generic.IComparer<EmailSetting>
		{
			public SorterMode SorterMode;
			public SmtpPasswordComparer()
			{ }
			public SmtpPasswordComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<EmailSetting> Membres
			int System.Collections.Generic.IComparer<EmailSetting>.Compare(EmailSetting x, EmailSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.SmtpPassword.CompareTo(x.SmtpPassword);
				}
				else
				{
					return x.SmtpPassword.CompareTo(y.SmtpPassword);
				}
			}
			#endregion
		}
		public class IsSslComparer : System.Collections.Generic.IComparer<EmailSetting>
		{
			public SorterMode SorterMode;
			public IsSslComparer()
			{ }
			public IsSslComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<EmailSetting> Membres
			int System.Collections.Generic.IComparer<EmailSetting>.Compare(EmailSetting x, EmailSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.IsSsl.CompareTo(x.IsSsl);
				}
				else
				{
					return x.IsSsl.CompareTo(y.IsSsl);
				}
			}
			#endregion
		}
		public class NoteComparer : System.Collections.Generic.IComparer<EmailSetting>
		{
			public SorterMode SorterMode;
			public NoteComparer()
			{ }
			public NoteComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<EmailSetting> Membres
			int System.Collections.Generic.IComparer<EmailSetting>.Compare(EmailSetting x, EmailSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Note.CompareTo(x.Note);
				}
				else
				{
					return x.Note.CompareTo(y.Note);
				}
			}
			#endregion
		}
	}
}
